<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<style>
.example-modal .modal {
	position: relative;
	top: auto;
	bottom: auto;
	right: auto;
	left: auto;
	display: block;
	z-index: 1;
}

.example-modal .modal {
	background: transparent !important;
}
</style>

<div class="modal" id="addGruposModal" role="dialog"
	aria-labelledby="addGruposModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 id="addGruposModalLabel" class="modal-title">
					<spring:message code="create" />
					&nbsp;
					<spring:message code="grupo" />
				</h4>
			</div>
			<form name="newGrupoForm" novalidate>
				<div class="modal-body">
					<div class="box-body">
						<div class="form-group">
							<label for="nome">* <spring:message code="grupos.nome" />:
							</label> <input type="text" required autofocus ng-model="grupo.nome"
								name="nome"
								placeholder="<spring:message code='grupo'/>&nbsp;<spring:message code='grupos.nome'/>" />
						</div>
					</div>
					<!-- /.box-body -->
				</div>
				<div class="modal-footer">
					<button class="btn btn-default pull-left" data-dismiss="modal"
						ng-click="exit('#addGruposModal');" aria-hidden="true">
						<spring:message code="cancel" />
					</button>

					<input type="submit" class="btn btn-primary"
						ng-click="createGrupo(newGrupoForm);"
						value='<spring:message code="create"/>' />
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
</div>
<!-- /.modal -->

<!-- Modal Para Update de Grupos -->
<div class="modal" id="updateGruposModal" role="dialog"
	aria-labelledby="updateGruposModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 id="updateGruposModalLabel" class="modal-title">
					<spring:message code="update" />
					&nbsp;
					<spring:message code="grupo" />
				</h4>
			</div>
			<form name="updateGrupoForm" novalidate>
				<div class="modal-body">
					<div class="box-body">
						<div class="form-group">
							<input type="hidden" required ng-model="grupo.id" name="id"
								value="{{grupo.id}}" /> <label for="nome">* <spring:message
									code="grupos.nome" />:
							</label> <input type="text" required autofocus ng-model="grupo.nome"
								name="nome"
								placeholder="<spring:message code='grupo'/>&nbsp;<spring:message code='grupos.nome'/>" />
						</div>
						<div class="form-group">
							<div class="alert alert-error"
								ng-show="displayValidationError && updateGrupoForm.name.$error.required">
								<button type="button" class="close" data-dismiss="alert"
									aria-hidden="true">&times;</button>
								<spring:message code="required" />
							</div>
						</div>
					</div>
					<!-- /.box-body -->
				</div>
				<div class="modal-footer">
					<button class="btn btn-default pull-left" data-dismiss="modal"
						ng-click="exit('#updateGruposModal');" aria-hidden="true">
						<spring:message code="cancel" />
					</button>

					<input type="submit" class="btn btn-primary"
						ng-click="updateGrupo(updateGrupoForm);"
						value='<spring:message code="update"/>' />
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
</div>
<!-- /.modal -->

<!-- Modal de Remoção de Grupos -->
<div class="modal" id="deleteGruposModal" role="dialog"
	aria-labelledby="deleteGruposModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 id="deleteGruposModalLabel" class="modal-title">
					<spring:message code="delete" />
					&nbsp;
					<spring:message code="grupo" />
				</h4>
			</div>
			<form name="deleteGrupoForm" novalidate>
				<div class="modal-body">
					<div class="box-body">
						<p>
							<spring:message code="delete.confirm" />
							:&nbsp;{{grupo.nome}}?
						</p>
						<div class="form-group">
							<button class="btn btn-default pull-left" data-dismiss="modal"
								ng-click="exit('#deleteGruposModal');" aria-hidden="true">
								<spring:message code="cancel" />
							</button>

							<input type="submit" class="btn btn-primary"
								ng-click="deleteGrupo();"
								value='<spring:message code="delete"/>' />
						</div>
						<div class="form-group">
							<div class="alert alert-error dialogErrorMessage"
								ng-show="errorIllegalAccess">
								<button type="button" class="close" data-dismiss="alert"
									aria-hidden="true">&times;</button>
								<spring:message code="request.illegal.access" />
							</div>
						</div>
					</div>
					<!-- /.box-body -->
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
</div>
<!-- /.modal -->
